package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

/**
 * The persistent class for the overtime_hour_rules database table.
 */
@Entity
@Table(name = "overtime_hour_rules")
@NamedQueries({
        @NamedQuery(name = "OvertimeHourRules.findAll", query = "SELECT o FROM OvertimeHourRules o"),
        @NamedQuery(name = "OvertimeHourRules.findById", query = "SELECT o FROM OvertimeHourRules o WHERE o.id = :id"),
        @NamedQuery(name = "OvertimeHourRules.findByDescription", query = "SELECT o FROM OvertimeHourRules o WHERE o.description = :description")})
public class OvertimeHourRules implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    @Column(nullable = false, length = 255)
    private String description;

    // bi-directional many-to-one association to Employee
    @OneToMany(mappedBy = "overtimeHourRule")
    private List<Employee> employees;

    // bi-directional many-to-one association to HolidayOvertime
    @ManyToOne
    @JoinColumn(name = "id_hol_ot", nullable = false)
    private HolidayOvertime holidayOvertime;

    // bi-directional many-to-one association to NightOvertime
    @ManyToOne
    @JoinColumn(name = "id_night_ot", nullable = false)
    private NightOvertime nightOvertime;

    // bi-directional many-to-one association to SaturdayOvertime
    @ManyToOne
    @JoinColumn(name = "id_sat_ot", nullable = false)
    private SaturdayOvertime saturdayOvertime;

    // bi-directional many-to-one association to SundayOvertime
    @ManyToOne
    @JoinColumn(name = "id_sun_ot", nullable = false)
    private SundayOvertime sundayOvertime;

    public OvertimeHourRules() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Employee> getEmployees() {
        return this.employees;
    }

    public void setEmployees(List<Employee> employees) {
        this.employees = employees;
    }

    public HolidayOvertime getHolidayOvertime() {
        return this.holidayOvertime;
    }

    public void setHolidayOvertime(HolidayOvertime holidayOvertime) {
        this.holidayOvertime = holidayOvertime;
    }

    public NightOvertime getNightOvertime() {
        return this.nightOvertime;
    }

    public void setNightOvertime(NightOvertime nightOvertime) {
        this.nightOvertime = nightOvertime;
    }

    public SaturdayOvertime getSaturdayOvertime() {
        return this.saturdayOvertime;
    }

    public void setSaturdayOvertime(SaturdayOvertime saturdayOvertime) {
        this.saturdayOvertime = saturdayOvertime;
    }

    public SundayOvertime getSundayOvertime() {
        return this.sundayOvertime;
    }

    public void setSundayOvertime(SundayOvertime sundayOvertime) {
        this.sundayOvertime = sundayOvertime;
    }

}